package com.ruoyi.system.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TableManagementMapper;
import com.ruoyi.system.domain.TableManagement;
import com.ruoyi.system.service.ITableManagementService;

import java.util.List;

/**
 * 桌台管理Service业务层处理
 *
 * @author ruoyi
 * @date 2025-05-07
 */
@Service
public class TableManagementServiceImpl implements ITableManagementService
{
    @Autowired
    private TableManagementMapper tableManagementMapper;

    /**
     * 通过id查询桌台管理
     *
     * @param id 桌台管理主键
     * @return 桌台管理
     */
    @Override
    public TableManagement selectTableManagementById(Long id)
    {
        return tableManagementMapper.selectTableManagementById(id);
    }

    /**
     * 通过门店名称查询桌台管理列表
     *
     * @param storeName 门店名称
     * @return 桌台管理
     */
    @Override
    public List<TableManagement> selectTableManagementListByName(String storeName)
    {
        return tableManagementMapper.selectTableManagementListByName(storeName);
    }

    /**
     * 新增桌台管理
     *
     * @param tableManagement 桌台管理
     * @return 结果
     */
    @Override
    public int insertTableManagement(TableManagement tableManagement)
    {
        return tableManagementMapper.insertTableManagement(tableManagement);
    }

    /**
     * 修改桌台管理
     *
     * @param tableManagement 桌台管理
     * @return 结果
     */
    @Override
    public int updateTableManagement(TableManagement tableManagement)
    {
        return tableManagementMapper.updateTableManagement(tableManagement);
    }

    /**
     * 通过id批量删除桌台管理信息
     *
     * @param ids 需要删除的桌台管理主键
     * @return 结果
     */
    @Override
    public int deleteTableManagementByIds(Long[] ids)
    {
        return tableManagementMapper.deleteTableManagementByIds(ids);
    }

    /**
     * 通过id删除桌台管理信息
     *
     * @param id 桌台管理主键
     * @return 结果
     */
    @Override
    public int deleteTableManagementById(Long id)
    {
        return tableManagementMapper.deleteTableManagementById(id);
    }
}
